﻿Partial Public Class CommentUpdate
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Request.QueryString("action") = "Edit" Then
            Dim control As New UI.Control
            control = Page.LoadControl("~/Control/CommentEdit.ascx")
            pnlControl.Controls.Add(control)
        ElseIf Request.QueryString("action") = "Reply" Then
            TitlePage.InnerHtml = "Reply Comment " & Request.QueryString("CommentsID")
            Page.Title = "Reply Comment &lt; Meo Tom's Blog"
            Dim control As New UI.Control
            control = Page.LoadControl("~/Control/CommentReply.ascx")
            pnlControl.Controls.Add(control)
        ElseIf Request.QueryString("action") = "Spam" Then
            If IsNumeric(Request.QueryString("CommentsID")) Then
                Dim objComment As New Global.MeoTom.Core.BLL.Comments
                objComment.CommentsID = Integer.Parse(Request.QueryString("CommentsID"))
                objComment.BlockIP()
                objComment = Nothing
                Response.Redirect(Request.UrlReferrer.ToString, False)
            End If
        End If
    End Sub

End Class